package com.winter.runner;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * Created by chris_gang on 2018/5/29.
 * 项目启动执行
 * 这里通过Order 设定value=1 的值来指定执行顺序
 */
@Component
@Order(value = 1)
public class MyApplicationRunner implements ApplicationRunner {
    private static final Logger logger = LoggerFactory.getLogger(MyApplicationRunner.class);

    @Override
    public void run(ApplicationArguments var1) throws Exception{
        logger.info("中文乱码了");
        System.out.println("start!111111111111111111111111111111111111111");
    }

}
